﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<VSA.Presentation.Models.CustomerListModel>" %>
<%@ Import Namespace=" MVCControlsToolkit.Core" %>
<%@ Import Namespace=" MVCControlsToolkit.Controls" %>
<%@ Import Namespace=" VSA.Presentation.Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Customer List
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% Html.EnableClientValidation(); %>
    <h2>Customer List</h2>

    <% using (Html.BeginForm()) { %>
    <div>
        <fieldset>
        <div id="attempt">
            <%: Html.DataGridFor(m => m.ToDoCustomerList, ItemContainerType.tr, "../UserControl/Customer/DataGrid/ToDoEditItem", "../UserControl/Customer/DataGrid/ToDoDisplayItem", "../UserControl/Customer/DataGrid/ToDoGrid", "../UserControl/Customer/DataGrid/ToDoInsertItem")%>
        </div>
        <div>
            <% var pager = Html.PagerFor(m => m.Page, m => m.PrevPage, m => m.TotalPages); %>
                    
            <%:pager.PageButton("<<", PageButtonType.First, PageButtonStyle.Link) %>
            <%:pager.PageButton("<", PageButtonType.Previous, PageButtonStyle.Link) %>
            <%:pager.PageChoice(4, pageNames: p => string.Format("({0})", p)) %>
            <%:pager.PageButton(">", PageButtonType.Next, PageButtonStyle.Link) %>
            <%:pager.PageButton(">>", PageButtonType.Last, PageButtonStyle.Link) %>
            <%:Html.ManipulationButton(ManipulationButtonType.ResetGrid, "Reset", m => m.ToDoCustomerList, null, ManipulationButtonStyle.Button)%>
        </div>
        <%: Html.EnableSortingFor(m => m.ToDoCustomerList, m => m.ToDoCustomerOrder, "NormalHeaderToDo", "AscendingHeaderToDo", "DescendingHeaderToDo", causePostback: false, page: m => m.Page)%>
        </fieldset>
    </div>
    <% } %>

    <% Html.DetailFormFor(Ajax, m => m.ToDoCustomerList, ExternalContainerType.div,
           "InsertEditDetailToDo", "Customer", null, "isChangedToDo", "isDeletedToDo", detailDialog:
           new MVCControlsToolkit.Controls.DataGrid.Dialog
           {
               Title="prova dialogo",
               Show="slide",
               Hide="slide"

           });%>

</asp:Content>
